<?php 
include '../data/data.php';
$user=$_SESSION['user']; //获取到的用户名
$pass=$_SESSION['pass']; //获取到的密码
$result= mysql_query("SELECT * FROM user WHERE username='$user' and password='$pass'", $link);  
$row = mysql_fetch_array($result);
if($row[id]==''){
	header('location:/user/login.html?fwd=/user/tui.html');
}
?>
<html><head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>我的推广 - <?php echo $rowx[name]; ?></title>
<link rel="stylesheet" href="/public/styles/base.css">
<link rel="stylesheet" href="/styles/my_favs.css">
<link rel="stylesheet" href="/styles/pay_list.css">
    <link rel="stylesheet" href="/css/new.css">
    <style>
        .login_btn {
            display: block;
            width: 50%;
            height: 45px;
            line-height: 45px;
            background-color: #29ba67;
            color: #ffffff;
            border: 0;
            border-radius: 2px;
            font-size: 24px;
            font-weight: 100;
            text-align: center;
            -webkit-box-shadow: 0 0 rgba(255, 0, 0, 0);
            box-shadow: 0 0 rgba(255, 0, 0, 0);
            margin: 27px auto 0;
            border-radius: 5px;
        }
        ui,li {
            list-style: none;
            font-size: 12px;
        }
        #news{
            height: 1rem;
            overflow: hidden;
            /*border: solid 1px #29ba67;*/
            text-align: center;
        }
         body, html, div {
             padding: 0;
             margin: 0;
             height: 100%;
         }
    </style>
</head>
<body class="bg00">
<div data-role="page" class="z_container bg01">
    <div class="main">
        <div class="tg_new">
            <img src="/picture/img_05.png" alt="">
            <span class="turn_one">
                <a href="/user/user.html"><img src="/picture/icon_20.png" alt=""></a>
            </span>
            <textarea id="mytext" class="area_none">我在玩最新版GM手游,不花一分钱上线送满级VIP+无限元宝,不花一分钱体验GM牛逼特权,道具装备随便刷一切,游戏下载地址：http://<?php echo $dlc; ?>/index?player=<?php echo $row['id']; ?></textarea>
            <span onclick="copyUrl()" class="turn_two">
                复制链接
            </span>
        </div>

        <section style="padding: 10px;font-size: large;background: #FBE2C5;min-height: 250px;">
            <div class="pay_list gift_logs">
                <ul class="list_header">
                    <li style="border:1px solid rgba(255,114,0,1);border-radius:5px;">
                        <span style="color: #FF7200;font-weight: 500;">注册时间</span>
                        <span style="color: #FF7200;font-weight: 500;" class="bold col-2">用户名</span>
                        <span style="color: #FF7200;font-weight: 500;" class="col-3">获得积分</span>
                    </li>
                </ul>
                <ul class="list_body">
                  <?php  
                  $playerid=$row[id];
$resultc = $conn->query("SELECT id, username, date FROM user WHERE qudao='$playerid' ORDER BY id DESC ");
 
if ($resultc->num_rows > 0) {
    while($rowc = $resultc->fetch_assoc()) {
        echo '<li>
                        <span style="color: #FF7200;font-weight: 500;">'.$rowc[date].'</span>
                        <span style="color: #FF7200;font-weight: 500;" class="bold col-2">'.$rowc[username].'</span>
                        <span style="color: #FF7200;font-weight: 500;" class="col-3">'.$config[player].'</span>
                    </li>';
    }
}
?> 
                  
                    <li>
                        <a id="show_more" href="javascript:void(0)"><span>没有更多了...</span></a>
                    </li>
                </ul>
            </div>
        </section>

    </div>
    <div class="footer_padding"></div>
</div>
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
   <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;" >
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title="">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="" >
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>

<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->

<script>
    $('#footer a:eq(5)').attr('id', 'footer_nav_active');
    function copyUrl(){
        var Url2 = document.getElementById("mytext");
        var text=Url2.value;
        var valueLength = text.length;
        selectText(Url2, 0, valueLength);
        if(document.execCommand('copy', false, null)){
            document.execCommand('copy', false, null)// 执行浏览器复制命令
            alert('已复制好，可贴粘。')
        }else{
            console.log("不兼容");
        }
    }
        function selectText(textbox, startIndex, stopIndex) {
                if(textbox.createTextRange) {//ie
                    var range = textbox.createTextRange();
                    range.collapse(true);
                    range.moveStart('character', startIndex);//起始光标
                    range.moveEnd('character', stopIndex - startIndex);//结束光标
                    range.select();//不兼容苹果
                }else{
                    //兼容苹果
                    textbox.setSelectionRange(startIndex, stopIndex);
                    textbox.focus();
                }
            }
  
</script>
<script>
    $('#qrcode_player_channel').qrcode({
        text:"http://<?php echo $dlc; ?>/index?player=<?php echo $row['id']; ?>",
        width: 160, //宽度
        height:160, //高度
        background: "#ffffff",
        correctLevel: 0,//纠错等级
    });
    $(function() {
        var $this = $("#news");
        var scrollTimer;
        $this.hover(function() {
            clearInterval(scrollTimer);
        }, function() {
            scrollTimer = setInterval(function() {
                scrollNews($this);
            }, 2500);
        }).trigger("mouseleave");

        function scrollNews(obj) {
            var $self = obj.find("ul");
            var lineHeight = $self.find("li:first").height();

            $self.animate({
                "marginTop": -lineHeight + "px"
            }, 500, function() {
                $self.css({
                    marginTop: 0
                }).find("li:first").appendTo($self);
            })
        }
    })
</script>

</body></html>